//
//  Camera.cpp
//  GSEngine
//
//  Created by Александр on 02.02.14.
//  Copyright (c) 2014 SNK. All rights reserved.
//

#include "Camera.h"

namespace GSEngine
{
    Camera::Camera()
    {
        m_viewMatrix.setIdentity();
    }
    Camera::~Camera()
    {
        
    }
    // fill matrix with position and rotation, inverse matrix
    void Camera::updateViewMatrix()
    {
        // there is no scale in camera
        setScale(vec3f(1.0f));
        
        updateWorldMatrix();
        m_viewMatrix = getWorldMatrix();
        m_viewMatrix.inverse();
    }
    // get view matrix
    mat4 Camera::getViewMatrix()
    {
        return m_viewMatrix;
    }
}
